namespace AdmissionQA.Domain.Entities;

/// <summary>
/// 奖学金信息实体
/// </summary>
public class ScholarshipInfo : EntityBase
{
    /// <summary>
    /// 奖学金名称
    /// </summary>
    public string ScholarshipName { get; private set; }

    /// <summary>
    /// 奖励金额（单位：元）
    /// </summary>
    public decimal Amount { get; private set; }

    /// <summary>
    /// 申请条件描述
    /// </summary>
    public string Requirements { get; private set; }

    /// <summary>
    /// 向量化Embedding字段
    /// </summary>
    public float[]? Embedding { get; set; }

    /// <summary>
    /// 构造函数
    /// </summary>
    private ScholarshipInfo(string scholarshipName, decimal amount, string requirements)
    {
        ScholarshipName = scholarshipName;
        Amount = amount;
        Requirements = requirements;
    }

    /// <summary>
    /// 创建奖学金信息实例
    /// </summary>
    public static ScholarshipInfo? CreateScholarshipInfo(
        string scholarshipName,
        decimal amount,
        string requirements
    )
    {
        // 可以加入一些判断

        return new ScholarshipInfo(scholarshipName, amount, requirements);
    }

    /// <summary>
    /// 更新奖学金信息
    /// </summary>
    public bool UpdateScholarshipInfo(
        string newScholarshipName,
        decimal newAmount,
        string newRequirements,
        string? newDescription
    )
    {
        // 可以加入一些判断

        ScholarshipName = newScholarshipName;
        Amount = newAmount;
        Requirements = newRequirements;
        Description = newDescription;

        return true;
    }
}
